package com.gopay.common.domain.cps.vo;

import java.math.BigDecimal;
import java.util.Date;

import com.gopay.common.domain.cps.CpsGenAssistOrder;
import com.gopay.common.domain.cps.CpsGenMainOrder;
import com.gopay.common.util.DateUtils;

/**
 * 辅助类订单
 * 
 * 现在订单分父子表，应为父子表必须同时完成动作，所以放在Manager中进行事务实现
 * 
 * @FullCpsGenAssistOrder.java
 * @author liujy @2013-1-14 下午5:08:34 www.gopay.com.cn Inc.All rights reserved.
 */
public class FullCpsGenAssistOrder extends CpsGenOrder {

	private static final long serialVersionUID = -5672665662560804481L;

	// 字表信息
	private String otherRecvInfo;
	private Date createdTs;
	private Date lastUpdTs;
	private String lastUpdTrancode;
	private String subRemark1;
	private String subRemark2;
	private String returnAmtAcct;
	private BigDecimal merTiliuAmt;
	private String merTiliuAcct;
	private BigDecimal refundFeeAmt;
	private String tranInitiator;// 交易发起方 1 - 商户系统2 - 国付宝用户网站3 - 国付宝控制台
	private String refundBankOrderNum;// 退款银行订单号
	private String refundRemark;// 退款配置
	// private String 投诉方; // TODO待添加
	/**
	 * 退款渠道宣广海添加
	 */
	private String refundChannel;

	public FullCpsGenAssistOrder() {

	}

	public FullCpsGenAssistOrder(CpsGenMainOrder main, CpsGenAssistOrder assist) {
		setGopayOrderId(main.getGopayOrderId());
		setTransDtlSq(main.getTransDtlSq());
		setGopayIntTxnCd(main.getGopayIntTxnCd());
		setMerId(main.getMerId());
		setMerOrderId(main.getMerOrderId());
		setMerTxnTm(main.getMerTxnTm());
		setGatewaySource(main.getGatewaySource());
		setGatewayChannel(main.getGatewayChannel());
		setOrderType(main.getOrderType());
		setPayChannel(main.getPayChannel());
		setGopayTxnTm(main.getGopayTxnTm());
		setRelevanceGopayOrderId(main.getRelevanceGopayOrderId());
		setTotalOrderAmt(main.getTotalOrderAmt());
		setTotalOrderFeeAmt(main.getTotalOrderFeeAmt());
		setOrderDealAmt(main.getOrderDealAmt());
		setOrderRealFeeAmt(main.getOrderRealFeeAmt());
		setOrderFeePayer(main.getOrderFeePayer());
		setCurType(main.getCurType());
		setMainRecvAcct(main.getMainRecvAcct());
		setMainRecvAcctProdCode(main.getMainRecvAcctProdCode());
		setMainRecvAcctProdName(main.getMainRecvAcctProdName());
		setMainRecvCustId(main.getMainRecvCustId());
		setPayAcct(main.getPayAcct());
		setMainPayAcctProdCode(main.getMainPayAcctProdCode());
		setMainPayAcctProdName(main.getMainPayAcctProdName());
		setPayCustId(main.getPayCustId());
		setTxnStaCd(main.getTxnStaCd());
		setOutStlmId(main.getOutStlmId());
		setOutPayAcct(main.getOutPayAcct());
		setTranFinishTime(main.getTranFinishTime());
		setOrderStlmTime(main.getOrderStlmTime());
		setLastUpdTrancode(main.getLastUpdTrancode());
		setRemark1(main.getRemark1());
		setRemark2(main.getRemark2());
		setMerTxnAmt(main.getMerTxnAmt());
		setReversalFlag(main.getReversalFlag());

		setAccountPoint(main.getAccountPoint());
		// 系统加固 结算金额 zhg.zhang 20160712
		setSettleAmt(main.getSettleAmt());
		setOtherAcct(main.getOtherAcct());
		this.otherRecvInfo = assist.getOtherRecvInfo();
		this.createdTs = assist.getCreatedTs();
		this.lastUpdTs = assist.getLastUpdTs();
		this.lastUpdTrancode = assist.getLastUpdTrancode();
		this.subRemark1 = assist.getRemark1();
		this.subRemark2 = assist.getRemark2();
		this.merTiliuAcct = assist.getMerTiliuAcct();
		this.merTiliuAmt = assist.getMerTiliuAmt();
		this.returnAmtAcct = assist.getReturnAmtAcct();
		this.refundFeeAmt = assist.getRefundFeeAmt();
		this.tranInitiator = assist.getTranInitator();// tranInitator
		this.refundBankOrderNum = assist.getRefundBankOrderNum();
		this.refundRemark = assist.getRefundRemark();
		this.refundChannel = assist.getRefundChannel();
	}

	public CpsGenMainOrder getCpsGenMainOrder() {
		CpsGenMainOrder main = new CpsGenMainOrder();
		main.setGopayOrderId(getGopayOrderId());
		main.setTransDtlSq(getTransDtlSq());
		main.setGopayIntTxnCd(getGopayIntTxnCd());
		main.setMerId(getMerId());
		main.setMerOrderId(getMerOrderId());
		main.setMerTxnTm(getMerTxnTm());
		main.setGatewaySource(getGatewaySource());
		main.setGatewayChannel(getGatewayChannel());
		main.setOrderType(getOrderType());
		main.setPayChannel(getPayChannel());
		main.setGopayTxnTm(getGopayTxnTm());
		main.setRelevanceGopayOrderId(getRelevanceGopayOrderId());
		main.setTotalOrderAmt(getTotalOrderAmt());
		main.setTotalOrderFeeAmt(getTotalOrderFeeAmt());
		main.setOrderDealAmt(getOrderDealAmt());
		main.setOrderRealFeeAmt(getOrderRealFeeAmt());
		main.setOrderFeePayer(getOrderFeePayer());
		main.setCurType(getCurType());
		main.setMainRecvAcct(getMainRecvAcct());
		main.setMainRecvAcctProdCode(getMainRecvAcctProdCode());
		main.setMainRecvAcctProdName(getMainRecvAcctProdName());
		main.setMainRecvCustId(getMainRecvCustId());
		main.setPayAcct(getPayAcct());
		main.setMainPayAcctProdCode(getMainPayAcctProdCode());
		main.setMainPayAcctProdName(getMainPayAcctProdName());
		main.setPayCustId(getPayCustId());
		main.setTxnStaCd(getTxnStaCd());
		main.setOutStlmId(getOutStlmId());
		main.setOutPayAcct(getOutPayAcct());
		main.setTranFinishTime(getTranFinishTime());
		main.setOrderStlmTime(getOrderStlmTime());
		main.setCreatedTs(DateUtils.getSystemDate());
		main.setLastUpdTs(DateUtils.getSystemDate());
		main.setLastUpdTrancode(getLastUpdTrancode());
		main.setRemark1(getRemark1());
		main.setRemark2(getRemark2());
		main.setMerTxnAmt(getMerTxnAmt());
		main.setAccountPoint(getAccountPoint());
		main.setReversalFlag(getReversalFlag());
		// 系统加固 结算金额 zhg.zhang 20160712
		main.setSettleAmt(getSettleAmt());
		main.setOtherAcct(getOtherAcct());
		return main;
	}

	public CpsGenAssistOrder getCpsGenAssistOrder() {
		CpsGenAssistOrder assist = new CpsGenAssistOrder();
		assist.setGopayOrderId(getGopayOrderId());
		assist.setOtherRecvInfo(otherRecvInfo);
		assist.setCreatedTs(createdTs);
		assist.setLastUpdTs(lastUpdTs);
		assist.setLastUpdTrancode(lastUpdTrancode);
		assist.setRemark1(subRemark1);
		assist.setRemark2(subRemark2);
		assist.setReturnAmtAcct(returnAmtAcct);
		assist.setRefundFeeAmt(refundFeeAmt);
		assist.setTranInitator(tranInitiator);
		assist.setRefundBankOrderNum(refundBankOrderNum);
		assist.setRefundRemark(refundRemark);
		assist.setRefundChannel(refundChannel);
		return assist;
	}

	public String getOtherRecvInfo() {
		return otherRecvInfo;
	}

	public void setOtherRecvInfo(String otherRecvInfo) {
		this.otherRecvInfo = otherRecvInfo;
	}

	public Date getCreatedTs() {
		return createdTs;
	}

	public void setCreatedTs(Date createdTs) {
		this.createdTs = createdTs;
	}

	public Date getLastUpdTs() {
		return lastUpdTs;
	}

	public void setLastUpdTs(Date lastUpdTs) {
		this.lastUpdTs = lastUpdTs;
	}

	public String getLastUpdTrancode() {
		return lastUpdTrancode;
	}

	public void setLastUpdTrancode(String lastUpdTrancode) {
		this.lastUpdTrancode = lastUpdTrancode;
	}

	public String getSubRemark1() {
		return subRemark1;
	}

	public void setSubRemark1(String subRemark1) {
		this.subRemark1 = subRemark1;
	}

	public String getSubRemark2() {
		return subRemark2;
	}

	public void setSubRemark2(String subRemark2) {
		this.subRemark2 = subRemark2;
	}

	public String getReturnAmtAcct() {
		return returnAmtAcct;
	}

	public void setReturnAmtAcct(String returnAmtAcct) {
		this.returnAmtAcct = returnAmtAcct;
	}

	public BigDecimal getMerTiliuAmt() {
		return merTiliuAmt;
	}

	public void setMerTiliuAmt(BigDecimal merTiliuAmt) {
		this.merTiliuAmt = merTiliuAmt;
	}

	public String getMerTiliuAcct() {
		return merTiliuAcct;
	}

	public void setMerTiliuAcct(String merTiliuAcct) {
		this.merTiliuAcct = merTiliuAcct;
	}

	public BigDecimal getRefundFeeAmt() {
		return refundFeeAmt;
	}

	public void setRefundFeeAmt(BigDecimal refundFeeAmt) {
		this.refundFeeAmt = refundFeeAmt;
	}

	public String getTranInitiator() {
		return tranInitiator;
	}

	public void setTranInitiator(String tranInitiator) {
		this.tranInitiator = tranInitiator;
	}

	public String getRefundBankOrderNum() {
		return refundBankOrderNum;
	}

	public void setRefundBankOrderNum(String refundBankOrderNum) {
		this.refundBankOrderNum = refundBankOrderNum;
	}

	public String getRefundRemark() {
		return refundRemark;
	}

	public void setRefundRemark(String refundRemark) {
		this.refundRemark = refundRemark;
	}

	public String getRefundChannel() {
		return refundChannel;
	}

	public void setRefundChannel(String refundChannel) {
		this.refundChannel = refundChannel;
	}
}
